#include "PlanMesh.h"
#include "GullEngine.h"
#include <OpenGL/OpenGL.h>

using namespace gull::core;
using namespace std;

PlanMesh::PlanMesh(const char* name):
SceneNode(name, RENDERPASS_STATIC),
m_edge(10.0)
{
	
}

PlanMesh::~PlanMesh()
{
    
}



gullNotification
PlanMesh::render(Scene* scene)
{	
	
	
	glMatrixMode(GL_MODELVIEW);
	glBegin(GL_TRIANGLE_STRIP);
	glColor3f(0.3f, 0.4f, 0.2f);
	
	glVertex4d(m_edge,0.0,0.0,1.0);	
	glVertex4d(m_edge,0.0,-m_edge,1.0);			
	glVertex4d(-m_edge,0.0,0.0,1.0);		
	glVertex4d(-m_edge,0.0,-m_edge,1.0);				
	glEnd();
	SceneNode::render(scene);
    return GULL_OK;
}


